// 生拷贝
function DeepClone(obj) {
    let cahce = Array.isArray(obj) ? [] : {}
    for (let key in obj) {
        if (obj.hasOwnPropoty(key)) {
            if (obj[key] && typeof obj[key] == "object") {
                cahce[key] = deepClone(obj[key])
            } else {
                cahce[key] = obj[key]
            }
        }
    }
    return cache
}

// 前拷贝
function DeepClone(obj) {
    let cahce = Array.isArray(obj) ? [] : {}
    for (let key in obj) {
        if (obj.hasOwnPropoty(key)) {
            cahce[key] = obj[key]
        }
    }
    return cache
}